<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>ReR - Matricular Aluno</title>
<!-- 	<h:outputStylesheet name="bootstrap.css" library="css" /> -->
	<h:outputStylesheet name="styles.css" library="css" />
	
</h:head>
<h:body>
	<ui:include src="menu/menu.xhtml" />
	<center>
	<h:form id="conteudo"> 
		<div id="subHeader">Matricular Aluno</div>		
		<h:messages class="alert alert-danger" role="alert" />

		<h:panelGrid columns="2" style="width:50%; float:left">

		<h:outputLabel value="* Data Matricula:" class="right" />
		<h:inputText value="#{matriculaBean.matricula.dataMatricula}" label="Data da Matricula">
				<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
		</h:inputText> 
		
		<h:outputLabel value="Aluno:" class="right"/>		
				<h:selectOneMenu value="#{matriculaBean.matricula.idAluno}" required="true" label="Campo ID Aluno">
					<f:selectItems value="#{matriculaBean.alunoMatricula()}" var="item" itemValue="#{item.idAluno}" itemLabel="#{item.nomeAluno}"/>
				</h:selectOneMenu>
		
		<h:outputLabel value="Plano:" class="right"/>		
				<h:selectOneMenu value="#{matriculaBean.matricula.idPlan}" required="true" label="Campo ID Plano">
					<f:selectItems value="#{matriculaBean.planosAtivos()}" var="item" itemValue="#{item.idPlan}" itemLabel="#{item.descPlan}"/>
				</h:selectOneMenu>
		
		<h:outputLabel value="* Turma:" class="right"/>		
				<h:selectOneMenu value="#{matriculaBean.matricula.idTurma}" required="true" label="Campo ID Turma">
					<f:selectItems value="#{matriculaBean.turmasAtivas()}" var="item" itemValue="#{item.idTurma}" itemLabel="#{item.nomeTurma}"/>
				</h:selectOneMenu>
				
		</h:panelGrid>
		
	
	
	 <br/>
			<h:commandButton value="Matricular" action="#{matriculaBean.cadastrar()}" class="btn" />

	</h:form>
	</center>
</h:body>
</html>